import React, {lazy} from 'react';
import {Redirect, Route, Switch} from 'react-router-dom';
import {hot} from 'react-hot-loader';

// const MkEage = lazy(() => import ('./setEqMessage/index'))
// const UtEage = lazy(()=>import('./setUTMessage/index'))
// const Admin = lazy(() => import('./adminPage'));
// const User = lazy(()=> import('./userPage'))
// const Equipment = lazy(()=>import('./equipment/index'))
// const FSM = lazy(()=>import ('./FSMPage'))
// const UT = lazy(()=>import ('./UTpage'))
// const FsmMEssage = lazy(()=>import('./CheckFsmMessage/index'))
// const Utprobe = lazy(()=>import('./subPages/UtPages/index'))
import MkEage from './setEqMessage/index'
import UtEage from './setUTMessage/index'
import Admin from './adminPage'
import User from './userPage'
import Equipment from './equipment/index'
import FSM from './FSMPage'
import UT from './UTpage'
import FsmMEssage from './checkFsmMessage/index'
import Utpeobe from './subPages/UtPages/index'
import Login from './login';


class Root extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <Switch>
                {/*<Route path="/" component={Home}/>*/}
                <Route exact path="/login" component={Login}/>
                <Route path="/admin" component={Admin}/>
                <Route path="/equipment" component={Equipment}/>
                <Route path="/user" component={User}/>
                <Route path="/FSM/:id" component={FSM} />
                <Route path="/UT/:id" component={UT} />
                <Route path='/FsmMessage' component={FsmMEssage}/>
                <Route path='/setMessage' component={MkEage}/>
                {/* <Route path='/UtForProbe' component={Utprobe}/> */}
                <Redirect to='/login'/>
            </Switch>
        )
    }
}


export default hot(module)(Root);